home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 3⁄23⁄90 / 0920-WriteToDeskScrap⁄col-Mar90 < prev    next >
Encoding:
Text File  |  1990-03-23  |  4.2 KB  |  91 lines  |  [TEXT/GEOL]

  1. Item    4421520                         18-March-90        22:12PST
  2.  
  3. From:   D0114                           Compuneering Inc, Erez Anzel,IDV
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    WriteToDeskScrap/color problm
  8.  
  9. Link sent 90.03.19 0110 EST
  10. To: MacApp.TECH$
  11.  
  12. SUBJECT:  Help WriteToDeskScrap/color problem
  13.  
  14. Dear Doctor,
  15.  
  16. I bit the bullet and converted my massive application from 1.1 to 2.0B9.  It's
  17. more or less converted, but some problems have popped up.
  18.  
  19. I am using the following:
  20.     Mac IIci, 8MB RAM, 80MB internal drive
  21.     Apple RGB 13" color monitor (no video card)
  22.     MultiFinder (2600K for MPW)
  23.     System 6.0.4
  24.     MPW 3.0
  25.     MacApp 2.0B9
  26.  
  27. The major problem probably has something to do with color.  My program has its
  28. roots in DrawShapes from three years ago.  It has a color menu just like in
  29. DrawShapes.  Old versions of my program work fine.  When I compile DrawShapes
  30. now, it works fine.  But when I compile my program now (debug version), it
  31. exhibits various odd symptoms, such as:
  32.     • it shows all the Color menu items in black and white;
  33.     • when I select a shape in my drawing window (the main view of which is
  34. called TDiagView; it is something like TShapeView), then choose an item from
  35. the Color menu, the shape sometimes stays black, and sometimes changes to a
  36. seemingly random color, no matter which menu item I choose (the "wrong" color
  37. is consistent though);
  38.     • if I choose the Color Picker item from the menu, it works fine:  the
  39. color of the selected shape changes correctly;
  40.     • if I select a shape, copy it, then open up the Scrapbook, it crashes with
  41. System Error = 12.  The crash occurs if I run on a Plus without MultiFinder,
  42. and on the IIci with or without MultiFinder.  It would probably crash on the
  43. Plus with MultiFinder as well.
  44.  
  45. I use view templates (created with ViewEdit); they are stored in a .rsrc file.
  46. I create the views in TMyDoc.DoMakeViews by calling NewTemplateWindow.  I
  47. assign a print handler just before leaving DoMakeViews.  I override IRes.  I
  48. also have an IDiagView method for creating the view for the clipboard.  I
  49. usually don't use any offscreen bitmaps.
  50.  
  51. The crash occurs while in TDiagView.WriteToDeskScrap.  While using MultiFinder,
  52. it would occur when the program tries to write out the PICT stuff to the scrap.
  53. Without MultiFinder, it waits until writing out my own format, then it dies.
  54. The crash is always indicated by the bomb box, not by any message in the Debug
  55. window.  TDiagView.WriteToDeskScrap normally calls INHERITED WriteToDeskScrap,
  56. so I stripped out that line and substituted all the code that is in
  57. TView.WriteToDeskScrap.  I put in lots of Writeln's to step through it all.  If
  58. I comment out all the stuff from OpenCPort through CloseCPort, then it doesn't
  59. crash (and doesn't write out PICT stuff either).  If I just comment out the
  60. call to Draw and replace it with a simple MoveTo and Line, it still crashes.
  61. If I substitute OpenPort(@tempPort) for OpenCPort(@tempCPort) and
  62. ClosePort(@tempPort) for CloseCPort(@tempCPort), it still crashes.
  63.  
  64. My qdExtent is reasonable (e.g. 0, 0, 100, 100).  My picture handle is not NIL.
  65. The frame rect in the newly created picture is reasonable.  The shape appears
  66. correctly in my application's clipboard window.
  67.  
  68. DrawShapes creates its views without templates.  Dave Wilson's Bird program
  69. uses templates, but does not have copying.  None of the other sample programs
  70. have color drawing (or any drawing for that matter).
  71.  
  72. I create the print handler in TMyDoc.DoMakeViews (like in Bird), though the
  73. problem is still there if I create it in TDiagView.IRes (like in DoubleVision).
  74. Do I need something like SetPalette and ActivatePalette as in DoubleVision?
  75. It's not done like that in DrawShapes.  I have a horizontal and a vertical
  76. ruler in my main window; I did it as it was done in DoubleVision.
  77.  
  78. I have other views in other windows that export just TEXT to the clipboard when
  79. you choose Copy while they are active.  I have not encountered any problem with
  80. them.
  81.  
  82. I gotta get over this hump.  Bug.  Humbug!.  Please help!  Any ideas would be
  83. greatly appreciated.  If you think you have an answer, please link me, then
  84. call me (collect if need be) at 416-738-4601 ASAP to let me know you've
  85. responded.  We are in the Eastern time zone.
  86.  
  87. Thanks.
  88.  
  89. See ya.......Erez
  90.  
  91.